package com.kaven.fragment;

import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;

import com.kaven.R;
import com.neusmart.common.fragment.BaseFragment;

/**
 * Created by keven on 2016/3/21.
 */
public class MainFragment extends BaseFragment implements View.OnClickListener, RadioGroup.OnCheckedChangeListener{
    private int preciousCheckedId = R.id.main_tab_prepare_exam;

    @Override
    protected int getLayoutResID() {
        return R.layout.fragment_main;
    }

    @Override
    protected void init() {

    }

    @Override
    public void onCheckedChanged(RadioGroup group, int checkedId) {
        switch (checkedId) {
            case R.id.main_tab_prepare_exam://备考

                break;
            case R.id.main_tab_driving_school://驾校

                break;
            case R.id.main_tab_community://社区

                break;
            case R.id.main_tab_dating_car://约车

                break;
            case R.id.main_tab_treasure_box://百宝箱

                break;
            default:
                break;
        }
        preciousCheckedId = checkedId;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.main_btn_community:
                ((RadioButton) mContentView.findViewById(R.id.main_tab_community)).setChecked(true);
                break;
            default:
                break;
        }
    }
}
